Skip to content

(MOT-4443) fix(console): recover router presence after reconnect - #810

Draft
ytallo wants to merge 1 commit into
fix/llm-router-invalid-statesfrom
fix/pr808-presence-reconnect
Draft

(MOT-4443) fix(console): recover router presence after reconnect#810
ytallo wants to merge 1 commit into
fix/llm-router-invalid-statesfrom
fix/pr808-presence-reconnect

Conversation

@ytallo

@ytallo ytallo commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • re-probe llm-router presence whenever the browser reconnects, including when the router was previously absent
  • track router worker identity and revision so a router restart rebuilds provider/catalog subscriptions even when presence stays true
  • discard stale presence, provider, and catalog responses from superseded probes
  • make the model refresh action authoritatively re-check router presence before refreshing providers and the catalog
  • add focused presence-watcher coverage and provider-backed quickstart scenarios for router restart and browser WebSocket outage recovery

Root cause

The Console could miss the router arrival event while its browser WebSocket was disconnected. Because the presence watcher remained absent, the model picker stayed disabled after reconnecting. A present-to-present router replacement also kept the same boolean state, so router-owned subscriptions were not necessarily rebuilt.

Impact

The model picker can recover without reloading the page when the router starts during a browser connection outage or when the router process is replaced. Transient fetch failures preserve the last confirmed catalog while successful empty responses still clear it.

Testing

  • pnpm test: 1,213 tests passed
  • pnpm run typecheck
  • pnpm run typecheck:e2e
  • Console production build
  • Biome on touched Console and Playwright files
  • bash -n harness/tests/quickstart/run-ci.sh
  • git diff --check
  • Playwright quickstart discovery lists both new recovery scenarios

The provider-backed quickstart scenarios were not executed end-to-end because they require a dedicated live stack and provider credentials.

Stacked on #808 and targets its head branch.

Refs MOT-4443

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 14, 2026 11:45pm
workers-tech-spec Ready Ready Preview Aug 14, 2026 11:45pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 60 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 341b9bfa-0867-45d2-9d3b-a8a14a4aa009

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant